﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ProcCodeCreator
{
    public partial class frmLogin : Form
    {
        public frmLogin()
        {
            InitializeComponent();
        }

        private void btn_Login_Click(object sender, EventArgs e)
        {
            using (SqlConnection conn = new SqlConnection(this.textBox1.Text.Trim()))
            {
                try
                {
                    conn.Open();
                    conn.Close();
                    frmMain main = new frmMain();
                    main.ConnectionString = this.textBox1.Text.Trim();
                    main.Show();
                }
                catch
                {
                    MessageBox.Show("无法连接数据库");
                }
            }
        }

        private void frmLogin_Load(object sender, EventArgs e)
        {

        }
    }
}
